package com.imooc.miaosha.controller;

import com.imooc.miaosha.domian.User;
import com.imooc.miaosha.result.Result;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * 模块描述: <br>
 * ()
 *
 * @Author: Mr. xyb
 * @Date: 2019/4/19 16:49
 * @since: 1.8.0
 * @version: 1.0.0
 */
@Controller
@RequestMapping("/user")
public class UserController {

    /**
     * 获取用户信息
     *
     * @param user
     * @param model
     * @return
     */
    @RequestMapping("/info")
    @ResponseBody
    public Result<User> info(User user, Model model) {
        return Result.success(user);
    }

}
